const path = require('path')

module.exports = {
	devServer: {
		port: 5000,
		open: true,
		proxy: {
			'/api':{
				target:"http://rap2api.taobao.org/app/mock/267671",
				changeOrigin:true,
				ws: false,
				pathRewrite:{
					"^/api":"/api"
				}
			}
		}
	},
	webpack: {	
		alias: {
			"pages": path.join(__dirname,'src/pages'),
			"components": path.join(__dirname,'src/components'),
			"utils": path.join(__dirname,'src/utils'),
			"api": path.join(__dirname,'src/api'),
			"routes": path.join(__dirname,'src/routes')
		}
	},
	babel: {
	   plugins: [
	     ["import", {
	       "libraryName": "antd",
	       "libraryDirectory": "es",
	       "style": "css"
	     }]
	   ]
	 }
}